package net.chasing.androidbaseconfig.adapter.recycleradaper;

import android.content.Context;
import android.view.View;

import net.chasing.androidbaseconfig.util.OneClickUtil;

/**
 * 单一的title itemView：
 * 优先使用notifyItemChange(index, payload)
 * notifyItemChange(index)会导致重新使用另一个itemView
 * 导致title生成了多个itemView，view的状态可能会不一致
 */
public abstract class RecyclerQuickAdapter<T> extends BaseRecyclerAdapter<T,RecyclerViewHelper> {
    protected OneClickUtil mOneClickUtil;

    public RecyclerQuickAdapter(Context context, /*BaseRecylerViewHolder recylerViewHolderHelper,*/int layoutId) {
        super(context, /*recylerViewHolderHelper*/layoutId, null);
        mOneClickUtil = new OneClickUtil();
    }

    public RecyclerQuickAdapter(Context context, BaseRecyclerMultitemTypeSupport baseRecyclerMultitemTypeSupport) {
        super(context,null, baseRecyclerMultitemTypeSupport);
        mOneClickUtil = new OneClickUtil();
    }


    @Override
    protected RecyclerViewHelper getAdapterHelper(int position, View itemView) {
        return new RecyclerViewHelper(context, itemView, position);
    }
}
